﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace PatNetShop.WebControls
{
    [DefaultProperty("Text")]
    [ToolboxData("<{0}:BooleanDropDownList runat=server></{0}:BooleanDropDownList>")]
    public class BooleanRadioButtonList : RadioButtonList
    {
        public BooleanRadioButtonList()
        {
            Items.Add(new ListItem("是", true.ToString()));
            Items.Add(new ListItem("否", false.ToString()));
        }

        public new Boolean SelectedValue
        {
            get
            {
                return Boolean.Parse(base.SelectedValue);
            }
            set
            {
                base.SelectedValue = value.ToString();
            }
        }
    }
}
